package ru.nsu.fit.iconveyor.log.console;

import ru.nsu.fit.iconveyor.engine.EngineStateObserver;

public class ConsoleLoggingEngineStateObserver implements EngineStateObserver {
    @Override
    public void onStart() {
        System.out.println("engine started");
    }

    @Override
    public void onFinish() {
        System.out.println("engine finished");
    }

    @Override
    public void onError(Exception cause, boolean stopped) {
        System.out.println("error of engine: " + cause.getLocalizedMessage());
        cause.printStackTrace();
    }

    @Override
    public void onStop() {
        System.out.println("engine stopped");
    }
}
